import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import UserFilmDetail from '../views/mobile/UserFilmDetail'
import ImgAndText from '../views/mobile/ImgAndText.vue' //图文报告
import ElectronicFilm from '../views/mobile/ElectronicFilm.vue' // 电子胶片
import ImageBrowsing from '../views/mobile/ImageBrowsing.vue' // 电子胶片
import HistoryPage from '../views/mobile/HistoryPage.vue'

// pad文件路径
import UserDetail from '../views/adaptation/UserFilmDetail'
import ImgAndTextApt from '../views/adaptation/ImgAndText.vue' //图文报告
// import ElectronicFilmApt from '../views/adaptation/ElectronicFilm.vue' // 电子胶片
// import ImageBrowsingApt from '../views/adaptation/ImageBrowsing.vue' // 电子胶片
import HistoryPageApt from '../views/adaptation/HistoryPage.vue'
Vue.use(Router)

export default new Router({
  // mode: "history",
  routes: [{
      path: '/',
      redirect: '/userFilmDetail/:studyid/:hospcode/:patientid/:hospdomain', //重定向
    },
    // {
    //   path: '/home',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    {
      path: '/userFilmDetail/:studyid/:hospcode/:patientid/:hospdomain',
      name: 'UserFilmDetail',
      component: UserFilmDetail
    },
    //独立的页面
    {
      path:'/imgAndText/:studyid/:hospcode/:patientid/:hospdomain', 
      component: ImgAndText,
      children: [],
    },
    {
      path:'/electronicFilm/:studyid/:hospcode/:patientid/:hospdomain', 
      component: ElectronicFilm,
      children: [],
    },
    {
      path:'/imageBrowsing/:studyid/:hospcode/:patientid/:hospdomain', 
      component: ImageBrowsing,
      children: [],
    },
    {
      path: '/historyPage',
      component: HistoryPage,
      children: [],
    },

    // pad适配路由
    {
      path: '/',
      redirect: '/userDetail/:studyid/:hospcode/:patientid/:hospdomain', //重定向
    },
    {
      path: '/userDetail/:studyid/:hospcode/:patientid/:hospdomain',
      name: 'UserDetail',
      component: UserDetail
    },
    //独立的页面
    {
      path: '/ImgAndTextApt/:studyid/:hospcode/:patientid/:hospdomain',
      component: ImgAndTextApt,
      children: [],
    },
    // {
    //   path: '/ElectronicFilmApt/:studyid/:hospcode/:patientid/:hospdomain',
    //   component: ElectronicFilmApt,
    //   children: [],
    // },
    // {
    //   path: '/ImageBrowsingApt/:studyid/:hospcode/:patientid/:hospdomain',
    //   component: ImageBrowsingApt,
    //   children: [],
    // },
    {
      path: '/HistoryPageApt/:studyid/:hospcode/:patientid/:hospdomain',
      component: HistoryPageApt,
      children: [],
    }
  ]
})
